#include "common.h"

#ifdef USE_SFB

#ifndef __SPEEDFEEDBACK_H__
#define __SPEEDFEEDBACK_H__


//USE INT0
#define SFBINTERRUPTID 0
#if(SFBINTERRUPTID)
	#define SFBINTERRUPTINTID IE1_VECTOR
#else
	#define SFBINTERRUPTINTID IE0_VECTOR
#endif


#define SFB_ENABLE() EX(SFBINTERRUPTID)=1
#define SFB_INIT() IT(SFBINTERRUPTID)=1

uint SFB_GET();
void SFB_CLEAR();

#ifdef SDCC
void sfb_interrupt(void) interrupt SFBINTERRUPTINTID;
#endif

#endif//__SPEEDFEEDBACK_H__

#endif
